﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/QuanLy.master" AutoEventWireup="true"
    CodeFile="Khuyen_Mai.aspx.cs" Inherits="Admin_Khuyen_Mai" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:Label ID="thongbaotrantrung" runat="server" Text=""></asp:Label>
    <asp:Panel ID="panel" Visible="true" runat="server">
        <asp:GridView ID="gvDuLieu" runat="server" AutoGenerateColumns="False" CellPadding="2"
            ForeColor="#333333" GridLines="None" AllowPaging="True" Width="100%" AllowSorting="True"
            OnPageIndexChanging="gvDuLieu_PageIndexChanging" OnRowCancelingEdit="gvDuLieu_RowCancelingEdit"
            OnRowDeleting="gvDuLieu_RowDeleting" OnRowEditing="gvDuLieu_RowEditing" OnRowUpdating="gvDuLieu_RowUpdating"
            OnSorting="gvDuLieu_Sorting" PageSize="5">
            <RowStyle BackColor="#EFF3FB" />
            <Columns>
                <asp:BoundField HeaderStyle-HorizontalAlign="left" DataField="id"  HeaderText="ID" 
                    ReadOnly="True" SortExpression="id">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField HeaderStyle-HorizontalAlign="left" DataField="tieude" HeaderText="TIÊU ĐỀ"
                    SortExpression="tieude">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField HeaderStyle-HorizontalAlign="left" DataField="motavantat" HeaderText="MÔ TẢ VT"
                    SortExpression="motavantat">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField HeaderStyle-HorizontalAlign="left" DataField="motachitiet" HeaderText="MÔ TẢ CT"
                    SortExpression="motachitiet" ApplyFormatInEditMode="True">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField HeaderStyle-HorizontalAlign="left" DataField="hinhanh" HeaderText="HÌNH ẢNH"
                    SortExpression="hinhanh">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="NGÀY ĐĂNG TIN" SortExpression="ngaydangtin">
                    <ItemTemplate>
                        <%# ((DateTime)DataBinder.Eval(Container, "DataItem.ngaydangtin")).ToString("dd/MM/yyyy") %>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:TemplateField>
                <asp:CommandField ShowEditButton="True" CancelText="&lt;img border='0' src='images/nut/cancel.gif'&gt;"
                    DeleteText="X&#211;A" EditText="&lt;img border='0' src='images/nut/sua.jpg'&gt;"
                    InsertText="TH&#202;M" NewText="MỚI" SelectText="CHỌN" UpdateText="&lt;img border='0' src='images/nut/save.gif'&gt;" />
                <asp:CommandField ShowDeleteButton="True" CancelText="KH&#212;NG" DeleteText="&lt;img border='0' src='images/nut/xoa.jpg'&gt;"
                    EditText="SỬA" InsertText="TH&#202;M" NewText="MỚI" SelectText="CHỌN" UpdateText="LƯU" />
            </Columns>
            <EditRowStyle BackColor="#2461BF" Wrap="True" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="White" />
            <PagerSettings FirstPageText="ĐẦU TI&#202;N" LastPageText="CUỐI C&#217;NG" PageButtonCount="5" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
        <br />
        <hr color="#008000" size="1">
        <table width="100%">
            <tr>
                <td colspan="3">
                    <strong><span style="color: #ff0000">THÊM MỚI KHUYẾN MÃI</span></strong>
                </td>
            </tr>
            <tr>
                <td colspan="3">
                </td>
            </tr>
            <tr>
                <td colspan="3">
                </td>
            </tr>
            <tr>
                <td width="30%">
                    <span style="color: #0000ff">TIÊU ĐỀ</span>
                </td>
                <td colspan="2">
                    <asp:TextBox ID="tieude" runat="server" Width="95%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="30%">
                    <span style="color: #0000ff">MÔ TẢ VẮN TẮT</span>
                </td>
                <td colspan="2">
                    <asp:TextBox ID="motavantat" runat="server" TextMode="MultiLine" Height="50" Width="95%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="30%">
                    <span style="color: #0000ff">MÔ TẢ CHI TIẾT</span>
                </td>
                <td colspan="2">
                    <asp:TextBox ID="motachitiet" runat="server" TextMode="MultiLine" Height="200" Width="95%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="30%">
                    <span style="color: #0000ff">HÌNH MINH HỌA</span>
                </td>
                <td colspan="2">
                    <asp:FileUpload ID="hinhanh" Width="95%" runat="server" />
                </td>
            </tr>
            <tr>
                <td>
                    <br />
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td colspan="2">
                    <asp:Button ID="luudanhmuc" runat="server" Height="30px" OnClick="luudanhmuc_Click"
                        Text="LƯU KHUYẾN MÃI" Width="30%" />
                </td>
            </tr>
        </table>
    </asp:Panel>
</asp:Content>
